//
//  TTCountTimer.h
//  ITBE
//
//  Created by ITBE on 2019/1/28.
//  Copyright © 2019年 鲍利成. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef enum{
    TimerStart,
    TimerSuspend,
    TimerStop
} TimerStatus;
@protocol TTCountTimerProtocol <NSObject>

-(void)didReachTimeInterval;

@end
@interface TTCountTimer : NSObject
{
    dispatch_source_t timer;
    NSTimeInterval timeInterval;
}
@property(nonatomic) TimerStatus status;
@property(nonatomic, weak) id<TTCountTimerProtocol> delegate;
-(instancetype)initWithTimerInterval:(NSTimeInterval)interval;
-(void)startTimer;
-(void)resumeTimer;
-(void)suspendTimer;
-(void)stopTimer;
@end

NS_ASSUME_NONNULL_END
